<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    //工厂模式
    //造一辆车 出厂 （合格证/建议零售价/说明书）
    function repairer(name,time,product,price,specification){
        var Car=new Object();
        Car.name=name;
        Car.time=time;
        Car.product=product;
        Car.price=price;
        Car.specification=specification;
        Car.sayName=function(){
            alert("车品牌："+this.name+",出厂时间："+this.time+",合格证："+this.product+",建议零售价："+this.price+",说明："+this.specification)
        }
        return Car;
    }

    var car=repairer("凯迪拉克","2017.7.25","合格，","43万~80万","将力量、速度和豪华融为一体！")
    car.sayName()
</script>
</body>
</html>